Skip to content

Consistent assert message. NFC#26701

Open
sbc100 wants to merge 1 commit intoemscripten-core:mainfrom
sbc100:error_messages
Open

Consistent assert message. NFC#26701
sbc100 wants to merge 1 commit intoemscripten-core:mainfrom
sbc100:error_messages

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented Apr 16, 2026

  • Message should not start with capital letter
  • Message should not end with period.
  • No need to end message with exclamation point

@sbc100 sbc100 requested review from dschuff and kripken April 16, 2026 22:57
Comment thread src/shell.js Outdated

#if !ENVIRONMENT_MAY_BE_WEB
assert(!ENVIRONMENT_IS_WEB, 'web environment detected but not enabled at build time. Add `web` to `-sENVIRONMENT` to enable.');
assert(!ENVIRONMENT_IS_WEB, 'web environment detected but not enabled at build time (Add `web` to `-sENVIRONMENT` to enable)');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert(!ENVIRONMENT_IS_WEB, 'web environment detected but not enabled at build time (Add `web` to `-sENVIRONMENT` to enable)');
assert(!ENVIRONMENT_IS_WEB, 'web environment detected but not enabled at build time (add `web` to `-sENVIRONMENT` to enable)');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also 3 cases below.

- Message should not start with capital letter
- Message should not end with period.
- No need to end message with exclamation point
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants